﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using Com.Toook.ParseHtml;
using Com.Toook.ParseHtml.Entity;

public partial class NextPageArticle_52duzhe_GetNext : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void ButtonGetNext_Click(object sender, EventArgs e)
    {
        if (!Page.IsValid)
        {
            lblMsg.Text = "输入正确参数";
            return;
        }
        string xmlFilePath = Server.MapPath("~\\App_Data\\NextPageArticle\\" + txtXmlFileName.Text + ".xml");
        string startUrl = txtStartPageUrl.Text;
        CreateContentByXml createContent = new CreateContentByXml(xmlFilePath);
        DetailRoadMap roadMap = createContent.GetDetailRoadMap(txtDetailId.Text);
        GetContentNextPage html = new GetContentNextPage(roadMap);
        html.lastNextIndex = 2;//分页中无法获取下一页，特殊处理取第二个链接
        html.GetContent(startUrl);
    }
}
